//
//  UIImage+iGallery.h
//  jingdongfang
//
//  Created by BOE on 2017/10/24.
//  Copyright © 2017年 LJL. All rights reserved.
//

#import <UIKit/UIKit.h>

@class ALAsset;
@interface UIImage (iGallery)
+ (UIImage *)imageRoundForSize:(CGSize)size withColor:(UIColor *)color;

- (UIImage *)fixOrientation;

+ (UIImage *)thumbnailForAsset:(ALAsset *)asset maxPixelSize:(NSUInteger)size;
- (UIImage *)imageWithCornerRadius:(CGFloat)radius;

//等比
- (UIImage *)scaleToSize:(CGSize)size;
+ (UIImage *)boxblurImage:(UIImage *)image withBlurNumber:(CGFloat)blur;

/**
 *  @author yangL, 16-09-06 15:09:14
 *
 *  压缩图片
 *
 *  @param image 待压缩的图片
 *
 *  @return 返回NSData数据
 *
 *  @since 1.3
 */
+ (NSData *)compressImage:(UIImage *)image;

/**
 *  @author shifeng, 16-09-09 16:06:15
 *
 *  @param image的size
 *
 *  @param 边框的宽
 *
 *  @param 边框的颜色
 *
 *  @return UIImage 返回带边框的圆形图片（常用于设置圆形头像）
 *
 */
- (UIImage *)roundImageWithSize:(CGSize)size borderWidth:(NSInteger)borderWidth borderColor:(UIColor *)borderColor;

/**
 *  @author yangL, 16-12-20 17:12:53
 *
 *  根据颜色生成一张图片
 *
 *  @param color color
 *
 *  @return return value description
 *
 *  @since 1.6
 */
+ (UIImage *)imageFromColor:(UIColor *)color;
@end
